<?php

namespace app\admin\model;

use think\Db;
use think\Model;

class Shop extends Model
{
     //获取shop的基本信息
     public static function getShopInfo($id)
     {
          $shop=Db::table('shop')->where('id',$id)->field(array('password','id'),true)->find();
          if($shop){
              $shopInfo=Db::table('shop_info')->where('shop_id',$id)->field(array('id','shop_id'),true)->find();
              return array_merge($shop,$shopInfo);
          }else{
               throw new \Exception("该用户不存在");
          }
     }


}
